Chapter 12

 

Signal Generators And

Waveform-Shaping Circuits

 

 

In this chapter we shall utilize Spice to investigate the behavior of various types of signal generators and waveform-shaping circuits. Both sinusoidal and square-wave generation circuits will be considered.  We shall first investigate the behavior of a Wien-bridge oscillator and an active-filter-tuned sinusoidal oscillator constructed with the 741 op-amp. Subsequently, we will investigate the behavior of a crystal oscillator configured with a pair of complementary MOS transistors.  Since these circuits are intended to be sinusoidal oscillators, the spectral purity of the signals generated from each circuit will be calculated using the Fourier series analysis capability of Spice.  Following this, we shall investigate the behavior of several multivibrator circuits that produce square waves. This will include the analysis of a bistable, astable, and monostable multivibrator circuits constructed with an op-amp.

 

Another interesting circuit that we shall investigate with Spice is a nonlinear waveform-shaping circuit.  With a triangular signal applied as input, this circuit shapes it into a sinewave of the same frequency.  This type of circuit is sometimes used in low-frequency function generators.  We shall use Spice to investigate the quality of the sine-wave signal produced with this type of circuit.

 

The chapter concludes with the analysis of several precision rectifier op-amp circuits commonly employed in instrumentation systems. This will include the analysis of a precision rectifier, a peak detector and a clamping circuit.

12.1 Op-amp-RC Sinusoidal Oscillators

 

In this section we shall investigate the behavior of a Wien-Bridge and an active-filter-tuned oscillator circuits assumed constructed with 741 op-amps. Unlike examples of the previous chapter, where it was sufficient to represent the terminal behavior of the op-amp with a linear network (see Section 11.3), the examples of this chapter rely on the nonlinear operation of the op-amp (eg., output voltage saturation), and thus, its terminal behavior must be modeled more completely.  Fortunately, many IC component manufacturers are making available macromodels of their op-amps in the form of a Spice subcircuit description, capturing much of the op-amp's large-signal behavior in a much simpler circuit representation than a detailed transistor description [Texas Instruments, 1990]. This makes the task of circuit simulation more efficient without sacrificing accuracy.  As an example, a Spice subcircuit description of the 741 op-amp is shown listed in Fig. 12.1. We shall use this subcircuit description for the 741 op-amp in all of the circuit simulations of this chapter that contain op-amps.[1]

12.1.1 The Wien-Bridge Oscillator

 

In Fig. 12.2 we present a Wien-Bridge oscillator circuit with a diode limiter in its negative feedback path.  The diode limiter serves to maintain the loop gain at unity and stabilizes the amplitude of the oscillations. The components were selected such that oscillations occur at 1 kHz.  The potentiometer P is meant to be adjusted such that the oscillations just begin to grow.  In the following we would like to investigate the behavior of this oscillator circuit for different settings on the potentiometer. This is equivalent to selecting different values for R1a and R1b, such that R1a + R1b = 50 kΩ.  Since oscillations begin when (R2 + R1b)/ R1a = 2, or when R1a = 20 kΩ and R1b = 30 kΩ, we shall consider three possible settings:

 

(a) R1a = 15 kΩ, R1b = 35 kΩ,  (b) R1a = 18 kΩ, R1b = 32 kΩ, and (c) R1a = 25 kΩ, R1b = 25 kΩ.

 

The first setting establishes a loop gain of 1.33 at the frequency of oscillation and should be more than enough for the oscillations to begin. The second setting reduces the loop gain to 1.1, just above the level that is necessary for oscillations to begin. Finally, the last setting creates a loop gain of 0.8 and should prevent the circuit from beginning or sustaining oscillations.

 

The Spice input file describing the Wien-bridge oscillator is shown in Fig. 12.3. The potentiometer is assumed to be set according to the setting described in (a) above. Notice that the voltage across each capacitor is initialized at 0 V. This is to demonstrate that this circuit will begin oscillations on its own without the need of any start-up circuit.  The start of the oscillation is caused by the offset voltage of the op-amp. To force Spice to utilize the supplied initial conditions, the .TRAN statement includes the keyword UIC (use initial conditions). The other two setting for the potentiometer is entered into separate Spice input file descriptions but attached to the end of the one shown in Fig. 12.4 before submission to Spice for execution.  This will enable us to compare the output behavior for the three different circuit setups.

 

The results of the simulation are shown in Fig. 12.4.  Here we see in the upper most graph the output oscillation for the Wien-bridge having a loop gain of 1.33. The frequency of oscillation is found to be 926.78 Hz slightly less than the intended value of 1 kHz. As is evident, the peaks of the output signal are clipped, indicating that the loop gain is too high. This is obviously not very useful as a sinusoidal generator because of the large distortion present. The middle graph illustrates the results of the oscillator with a reduced loop gain of 1.1 and demonstrates an undistorted sinusoidal waveform of 979.43 Hz frequency having an 8.165 V amplitude offset by -22.5 mV. The lowest-most graph confirms that oscillations will not begin when the loop gain is less than unity.

 

 

  .subckt uA741                1 2 3 4 5

  * connections:               | | | | |

  *                            | | | | |

  *          non-inverting input | | | |

  *                inverting input | | |

  *            positive power supply | |

  *              negative power supply |

  *                               output

  *

  *

  c1   11 12 8.661E-12

  c2    6  7 30.00E-12

  dc    5 53 dx

  de   54  5 dx

  dlp  90 91 dx

  dln  92 90 dx

  dp    4  3 dx

  egnd 99  0 poly(2) (3,0) (4,0) 0 .5 .5

  fb    7 99 poly(5) vb vc ve vlp vln 0 10.61E6 -10E6 10E6 10E6 -10E6

  ga    6  0 11 12 188.5E-6

  gcm   0  6 10 99 5.961E-9

  iee  10  4 dc 15.16E-6

  hlim 90  0 vlim 1K

  q1   11  2 13 qx

  q2   12  1 14 qx

  r2    6  9 100.0E3

  rc1   3 11 5.305E3

  rc2   3 12 5.305E3

  re1  13 10 1.836E3

  re2  14 10 1.836E3

  ree  10 99 13.19E6

  ro1   8  5 50

  ro2   7 99 100

  rp    3  4 18.16E3

  vb    9  0 dc 0

  vc    3 53 dc 1

  ve   54  4 dc 1

  vlim  7  8 dc 0

  vlp  91  0 dc 40

  vln   0 92 dc 40

.model dx D(Is=800.0E-18 Rs=1)

.model qx NPN(Is=800.0E-18 Bf=93.75)

.ends uA741

 

Fig. 12.1:  A Spice subcircuit description of a nonlinear macromodel of the 741 op-amp. We shall rely on this macromodel of the 741 op-amp in all examples of this chapter that contain op-amps.

 

 

 

A close up of a logo

Description automatically generated

 

 

 

Fig. 12.2:  A Wien-bridge oscillator with a limiter used for amplitude control.

A Wien-Bridge Oscillator With Amplitude Stabilization

* loop gain is 1.1 (R1a=15k R1b=35k)

 

** Circuit Description **

 

* op-amp subcircuit

 

+++++ place uA741 op-amp subcircuit here (see Fig. 12.1) +++++

 

** Main Circuit **

* power supplies

Vcc 7 0 DC +15V

Vee 8 0 DC -15V

* Wien-bridge oscillator

XAmp 2 6 7 8 4 uA741

R1a 6 0 15k

R1b 6 5 35k

R2 5 4 10k

R3 2 0 10k

C3 2 0 16nF IC=0V

R4 3 4 10k

C4 2 3 16nF IC=0V

* diode limiter circuit

D1 4 5 D1N4148

D2 5 4 D1N4148

* model statements

.model D1N4148 D (Is=0.1p Rs=16 CJO=2p Tt=12n Bv=100 Ibv=0.1p)

** Analysis Requests **

.OPTIONS itl5=0

.OP

.TRAN 200us 20ms 0ms 200us UIC

** Output Requests **

.PLOT TRAN V(4) V(5)

.probe v(4) v(5)

.end

 

 

Fig. 12.3: The Spice input deck for computing the transient behavior of the Wien-bridge oscillator shown in Fig. 12.2.

 

 

A screenshot of a social media post

Description automatically generated

 

Fig. 12.4: The start-up transient behavior of the Wien-bridge oscillator shown in Fig. 12.2.

 

 

It is interesting to compare the spectral purity of the waveform appearing at the output of the oscillator as marked in Fig. 12.2 with the waveform appearing at the op-amp output (labeled as Va). This is easily accomplished using the Fourier series analysis capabilities of Spice. Consider computing the first nine harmonics of the voltage waveform appearing across the output marked as Vo from which the total harmonic distortion (THD) can be computed. This requires that one add the following .FOUR command into the Spice file shown in Fig. 12.4  for a loop gain of 1.1:

.FOUR 979.43Hz V(5)

 

It is essential to use a close estimate of the oscillation frequency for the Fourier series analysis in Spice. A fractional error, say ±0.1%, produces a noticeable change in the harmonic content in the output voltage waveform. The results of this analysis are then found in the output file as follows:

 

 

FOURIER COMPONENTS OF TRANSIENT RESPONSE V(5)

 

 DC COMPONENT =  -1.159314E-02

 

 HARMONIC   FREQUENCY    FOURIER    NORMALIZED    PHASE        NORMALIZED

    NO         (HZ)     COMPONENT    COMPONENT    (DEG)       PHASE (DEG)

 

     1     9.794E+02    8.093E+00    1.000E+00    7.443E+00    0.000E+00

     2     1.959E+03    2.483E-01    3.068E-02    1.691E+01    9.469E+00

     3     2.938E+03    2.917E-01    3.604E-02   -4.998E+01   -5.742E+01

     4     3.918E+03    6.764E-02    8.358E-03   -1.021E+00   -8.464E+00

     5     4.897E+03    1.125E-01    1.390E-02   -1.121E+01   -1.866E+01

     6     5.877E+03    4.797E-02    5.927E-03   -2.027E+01   -2.772E+01

     7     6.856E+03    6.630E-02    8.193E-03    3.834E+01    3.090E+01

     8     7.835E+03    6.487E-02    8.016E-03    8.205E+00    7.612E-01

     9     8.815E+03    8.325E-03    1.029E-03    1.134E+02    1.059E+02

 

     TOTAL HARMONIC DISTORTION =   5.168163E+00 PERCENT

 

 

Repeating this analysis for the output voltage waveform appearing at the op-amp output using the command:

 

.FOUR 979.43Hz V(4)

we obtain the following results:

 

 

FOURIER COMPONENTS OF TRANSIENT RESPONSE V(4)

 

 DC COMPONENT =  -1.196819E-02

 

 HARMONIC   FREQUENCY    FOURIER    NORMALIZED    PHASE        NORMALIZED

    NO         (HZ)     COMPONENT    COMPONENT    (DEG)       PHASE (DEG)

 

     1     9.794E+02    8.748E+00    1.000E+00    7.390E+00    0.000E+00

     2     1.959E+03    2.595E-01    2.967E-02    1.659E+01    9.195E+00

     3     2.938E+03    3.824E-01    4.371E-02   -2.690E+01   -3.429E+01

     4     3.918E+03    8.218E-02    9.394E-03    1.496E+00   -5.895E+00

     5     4.897E+03    1.669E-01    1.908E-02    4.072E+00   -3.318E+00

     6     5.877E+03    6.224E-02    7.115E-03   -1.151E+01   -1.890E+01

     7     6.856E+03    9.173E-02    1.049E-02    4.158E+01    3.419E+01

     8     7.835E+03    7.950E-02    9.088E-03    1.081E+01    3.416E+00

     9     8.815E+03    1.452E-02    1.660E-03    9.456E+01    8.717E+01

 

     TOTAL HARMONIC DISTORTION =   5.906799E+00 PERCENT

 

 

Comparison of the above two sets of results indicates that the voltage waveform appearing at the op-amp output contains slightly more harmonic distortion than the voltage output marked Vo as indicated by the THD measures. But, in all fairness, the difference is very small, and one may prefer to obtain the output from the low-impedance op-amp output terminal instead of the high-impedance node that is presently marked as the output.

 

 

 

 

A close up of a piece of paper

Description automatically generated

 

 

 

Fig. 12.5: An active-filter-tuned oscillator with the Q of the filter adjustable by R1.

 

The Active-Filter Tuned Oscillator

 

** Circuit Description **

 

* op-amp subcircuit

 

.LIB uA741.lib

 

** Main Circuit **

* power supplies

Vcc 8 0 DC +15V

Vee 9 0 DC -15V

* AC input source

*Vi 100 0 DC 0V AC 1V

* high-Q filter circuit

Xopamp1 3 5 8 9 1 uA741

Xopamp2 7 5 8 9 4 uA741

R1 2 3 200k

C1 3 0 16nF IC=0V

R2 3 4 10k

C2 4 5 16nF IC=0V

R3 5 1 10k

R4 1 7 10k

R5 7 0 10k

* diode limiter circuit

D1 0 2 D1N4153

D2 2 0 D1N4153

R6 1 2 10k

* model statement

.model D1N4153  D (Is=0.1p Rs=6 CJO=1p Tt=3n Bv=100 Ibv=0.1p)

** Analysis Requests **

.OPTIONS itl5=0

.OP

.TRAN 20us 100ms 0ms 20us UIC

** Output Requests **

.PLOT TRAN V(1) V(2)

.probe V(1) V(2)

.end

 

 

Fig. 12.6: The Spice input deck for computing the transient behavior of the active-filter-tuned oscillator circuit shown in Fig. 12.5.

 

 

 

A close up of a map

Description automatically generated

Fig. 12.7: The steady-state transient response of the active-filter tuned oscillator shown in Fig. 12.5 for Q=5.

 

12.1.2 An Active-Filter-Tuned Oscillator

In Fig. 12.5 we display an active-filter-tuned oscillator.  It consists of a high-Q bandpass filter connected in a positive feedback loop around a hard limiter. The filter circuit portion of this oscillator was designed to have a center frequency of 1 kHz and an adjustable Q determined by R1. Using Spice, we shall investigate the spectral purity of the output voltage waveform (V1) by computing its harmonic content for different values of filter Q.

 

We shall begin our analysis with a filter circuit in the feedback loop having a moderate Q of 5. This is achieved with R1=50 kΩ. The Spice description for this circuit arrangement is shown listed in Fig. 12.6. The op-amps are modeled after the commercial 741 op-amp circuit and the diodes are modeled after the 1N4148 type.  A transient analysis is requested beginning with the circuit initially at rest. This is achieved by setting the initial voltage across C1 and C2 to zero volts, as indicated by the keyword IC=0 V on the element statement for C1 and C2. In order to correctly compute the harmonic content of the output waveform, the circuit response must have reached its steady state. As a lower bound on the amount of time required for this to happen, assume that the filter circuit within the feedback loop of the oscillator has an underdamped response characterized by a pair of complex poles described by ωo and Q. As a result, its impulse response can be described by a damped sinusoidal having the following form:

(12.1)

 

 

Clearly then, in order for the transient response to die out to less than 0.1% of its initial value, the exponential term in Eqn. (12.1) must reduce in value to something less than 0.001. The amount of time required for this to happen is then found from the following:

 (12.2)

 

which, when rearranged, gives

(12.3)

 

where we have denoted TS by the time for the output response to settle into its steady-state behavior.  Thus, for a filter Q of 5, we can expect the transient response to last for about 11 ms. Since the filter circuit is placed inside a positive feedback loop, the effective Q of the oscillator circuit will be much larger than the Q of the filter circuit. Thus, from Eqn. (12.3), we can expect that the time for the oscillator circuit to reach its steady state will be much longer than 11 ms.

 

Through several iterations with Spice we found that the oscillator circuit shown in Fig. 12.5 for a filter Q of 5 required 50 ms to reach its steady state. Furthermore, to get good coverage of the output waveform, mainly for plotting purposes, 10 points-per-period of oscillation was taken. Moreover, the results of this analysis revealed that the frequency of oscillation was precisely 1 kHz.

 

As the output request, only the output voltage and the voltage across the limiter are asked to be plotted. Also, we have requested that PROBE store only the results of these two voltages in order to reduce the amount of data that is stored on disk which can be quite enormous during a transient analysis.

 

Finally, a .FOUR command was added to the Spice input file to compute the harmonic content in the output voltage waveform having the following form:

 

.FOUR 1kHz V(1).

 

The results of the transient analysis are shown in Fig. 12.7. Here we display in the top graph the output voltage waveform of the oscillator and the lower graph displays the voltage signal appearing across the diode limiter.  As is evident, the output signal appears undistorted, unlike that of the voltage appearing across the diode limiter. The frequency of oscillation of either waveform is seen to be very close to 1 kHz.  The results of the Fourier series calculation reveal the following harmonic content in the output voltage waveform:

 

FOURIER COMPONENTS OF TRANSIENT RESPONSE V(1)

 

 DC COMPONENT =  -6.624248E-03

 

 HARMONIC   FREQUENCY    FOURIER    NORMALIZED    PHASE        NORMALIZED

    NO         (HZ)     COMPONENT    COMPONENT    (DEG)       PHASE (DEG)

 

     1     1.000E+03    1.270E+00    1.000E+00    4.450E+01    0.000E+00

     2     2.000E+03    1.351E-02    1.063E-02    2.849E+01   -1.601E+01

     3     3.000E+03    2.765E-02    2.177E-02    3.920E+01   -5.298E+00

     4     4.000E+03    5.878E-03    4.627E-03    2.221E+01   -2.229E+01

     5     5.000E+03    4.676E-03    3.681E-03    6.410E+01    1.960E+01

     6     6.000E+03    3.573E-03    2.813E-03    2.499E+01   -1.952E+01

     7     7.000E+03    2.726E-03    2.146E-03    2.529E+01   -1.921E+01

     8     8.000E+03    2.635E-03    2.074E-03    2.553E+01   -1.897E+01

     9     9.000E+03    2.277E-03    1.793E-03    3.218E+01   -1.232E+01

 

     TOTAL HARMONIC DISTORTION =   2.533441E+00 PERCENT

 

 

                                     

As is evident, the total harmonic distortion (THD) is about 2.5%. Recall that for the Wien-bridge oscillator of the previous section the THD was approximately 2 times as large at 5%.

 

In order to repeat the above analysis for a filter Q of 20 (ie. R1=200 kΩ), we should increase the time that the transient analysis is performed. According to Eqn. (12.3) if the filter Q is increased by a factor of 4, the transient time also increases by the same factor. Thus, we should increase the time that the transient is performed to 200 ms while maintaining the same time step. On doing so, we obtain the following Fourier series components for the output voltage waveform:

 

FOURIER COMPONENTS OF TRANSIENT RESPONSE V(1)

 

 DC COMPONENT =   1.321303E-02

 

 HARMONIC   FREQUENCY    FOURIER    NORMALIZED    PHASE        NORMALIZED

    NO         (HZ)     COMPONENT    COMPONENT    (DEG)       PHASE (DEG)

 

     1     1.000E+03    1.268E+00    1.000E+00   -6.697E+01    0.000E+00

     2     2.000E+03    9.201E-03    7.254E-03   -5.044E+01    1.653E+01

     3     3.000E+03    5.859E-03    4.619E-03    2.491E+01    9.188E+01

     4     4.000E+03    2.674E-03    2.108E-03   -2.493E+01    4.204E+01

     5     5.000E+03    2.754E-03    2.171E-03   -3.491E+01    3.206E+01

     6     6.000E+03    1.652E-03    1.303E-03   -1.777E+01    4.920E+01

     7     7.000E+03    1.227E-03    9.673E-04   -1.296E+01    5.401E+01

     8     8.000E+03    1.162E-03    9.163E-04   -1.031E+01    5.666E+01

     9     9.000E+03    9.852E-04    7.767E-04   -9.472E+00    5.750E+01

 

TOTAL HARMONIC DISTORTION =   9.337391E-01 PERCENT

 

 

As expected, the THD in the output waveform has decreased due to the increased selectivity of the filter circuit portion of the oscillator.  In fact, we see that the THD decreased by almost the same factor that the filter Q was increased by.

 

 

 

 

    

A close up of text on a white background

Description automatically generated

 

Fig. 12.8:  Crystal oscillator circuit: (a) A crystal oscillator utilizing a CMOS inverter as an amplifier, and (b) An equivalent circuit representation of a piezoelectric crystal.

A Pierce Crystal Oscillator

 

** Circuit Description **

 

* 3.579545Mhz color burst, AT cut, parallel resonant, Q=25000,

.subckt colorburst_crystal 1 2

 l 1 11 0.0555779237 IC=1uA

 cs 11 12 3.56169600e-014

 r 12 2 50

 cp 1 2 8.90424001e-012

.ends

 

** Main Circuit **

* power supplies

Vdd 1 0 DC +5V

* oscillator circuit

Mp 2 3 1 1 pmos_transistor L=5u W=200u

Mn 2 3 0 0 nmos_transistor L=5u W=100u

Rf 2 3 10Meg

R1 2 4 75k

Xtal 3 4 colorburst_crystal

C1 3 0 10pF IC=2.5V

C2 4 0 10pF IC=2.5V

* model statement

.model pmos_transistor PMOS (kp=10u Vto=-1V lambda=0.04)

.model nmos_transistor NMOS (kp=20u Vto=+1V lambda=0.04)

** Analysis Requests **

.options limpts=100000 itl5=0 opts numdgt=7

.width out=80

* use the DC bias point as the initial conditions for the oscillator

.TRAN 20ns 20ms 0.0199972 20ns UIC

.FOUR 3.579MegHz

** Output Requests **

.PRINT TRAN V(2)

.end

 

 

Fig. 12.9: The Spice input deck for computing the output voltage waveform of the crystal.

 

A close up of a map

Description automatically generated

Fig. 12.10: The steady-state output voltage waveform from the crystal oscillator shown in Fig. 12.8.

 

 

12.2 Crystal Oscillators

 

In contrast to the active-RC oscillators circuit of the previous section, which can attain oscillation stabilities approaching 0.1%, crystal oscillators can obtain frequency stabilities many orders of magnitude greater, on the order of 1 in 106. Furthermore, at the heart of these oscillator circuits is a piezoelectric crystal that forms a resonant circuit with Q factor's on the order of 10,000 or more, resulting in highly selective oscillators.

An inexpensive crystal oscillator can be realized with a single crystal and a standard CMOS inverter, with several additional passive components, as shown in Fig. 12.8(a). In this particular case, the crystal is one that resonates at the TV color burst frequency of 3.579545 MHz and has a Q of 25,000. In the following we shall use Spice to compute the output waveform from this oscillator assuming that the two complementary transistors making up the CMOS inverter have parameters:  |VT|=1 V, μnCOX = 2 μpCOX =20 μA/V2 and λ=0.04 V-1. Furthermore, the lengths of each transistor are the same at 5 μm. The width of the NMOS 100 μm and the PMOS is 200 μm.  Spice does not have any built-in model for piezoelectric crystals, so instead, we make use of its equivalent circuit representation shown in Fig. 12.8(b).

 

The Spice input file describing the crystal oscillator in Fig. 12.8(a) is seen listed in Fig. 12.9. The piezoelectric crystal is described by a subcircuit called colorburst_crystal in order to make it easier to read the Spice input file. The model of this crystal was obtained from the PSpice library of device models supplied by the MicroSim Corporation. The inductor is initialized with a 1 μA current in order to assist in the transient analysis. More on this in a moment.

 

At this point we have to decide on how the transient analysis should be carried out. As it turns out, crystal circuits pose a difficult simulation problem for Spice owing to the unusually long transient behavior.  From Eqn. (12.3) we see that the number of cycles of oscillation required to pass before the steady state is reached is # of cycles = TS/T = ln (0.001)/πQ where T is the period of oscillation.  Unlike earlier examples where the Q factors were on the order of tens, crystal oscillators have Q factors on the order of tens-of-thousands.  As a result, incredibly long simulation times are necessary to obtain steady-state behavior.

 

Rather than perform the simulation on a personal computer, as were all other circuit simulation examples of this text, we have performed the above circuit simulation using a SUN 4 workstation running Spice version 2G6. In this way, we can obtain our results several order of magnitude faster than what would be possible using a personal computer. In addition, to speed up the transition to the steady state, several energy storage elements were initialized. The values used to initialize these elements were simply guessed at, keeping in mind values that would be typical of a low power oscillator circuit.  Experience has shown that the quickest transition to steady state was obtained when the inductor of the equivalent circuit representation of the crystal is initialized at some low current level as already suggested above.

 

The results of the simulation are shown plotted in Fig. 12.10. These results were generated with Spice version 2G6 but plotted using the graphics capability available with the PSpice software package. As is evident from the results shown in Fig. 12.10 the output voltage waveform has reached steady state with a frequency of oscillation of 3.579 MHz, set precisely by the crystal in the amplifiers feedback path. As is clearly evident, this output signal is highly distorted with a total harmonic distortion content of 20.9% as determined by the .FOUR command of Spice.

 

 

 

A close up of text on a white background

Description automatically generated

 

Fig. 12.11:  A collection of multi-vibrator circuits: (a) A bistable circuit, (b) An astable circuit, and (c) A monostable circuit.

 

12.3 Multivibrator Circuits

 

In some applications, the need arises for square waveforms. Multivibrators are one such class of circuits that can be used to accomplish this. Multivibrators are conveniently classified as (1) bistable circuits, (2) astable circuits, or (3) monostable circuits. In Fig. 12.11 we present one type of each. In the following we shall analyze each with Spice assuming that the op-amp in each circuit is modeled after the 741 type.

 

 

A close up of text on a white background

Description automatically generated

 

Fig. 12.11:  (a) A bistable multi-vibrator circuit.

(duplicate)

The Bistable Circuit

 

** Circuit Description **

 

* op-amp subcircuit

 

+++++ place uA741 op-amp subcircuit here (see Fig. 12.1) +++++

 

** Main Circuit **

* power supplies

Vcc 4 0 DC +15V

Vee 5 0 DC -15V

* input triangular waveform

Vi 1 0 PWL ( 0,-15V 1s,+15V 2s,-15V )

* positive feedback op-amp circuit

Xopamp1 2 1 4 5 3 uA741

R1 2 0 100k

R2 2 3 1Meg

** Analysis Requests **

.OPTIONS itl5=0

.TRAN 10ms 2s 0ms 10ms

** Output Requests **

.PLOT TRAN V(1) V(3)

.probe

.end

 

 

Fig. 12.12: The Spice input deck for computing the transfer characteristics of the bistable circuit shown in Fig. 12.11(a).

 

 

 

A close up of a map

Description automatically generated

 

(a)

 

A picture containing large

Description automatically generated

 

(b)

 

Fig. 12.13: (a) The input and output waveforms of the bistable circuit shown in Fig.12.11(a) as a function of time. (b) Transfer characteristics of the same bistable circuit.

 

 

 

 

A Bistable Circuit:

 

 In Fig. 12.11(a) we present an op-amp circuit with a positive feedback loop that has two stable states. The state in which the circuit is in is dependent on the input level and the previous state that the circuit was in.  As a result, this circuit exhibits a form of hysteresis. Using Spice we can deduce the hysteresis of the circuit shown in Fig. 12.11(a) from its transfer characteristics.  One might be tempted to perform a DC sweep of the input voltage Vi over the range supported by the two power supplies; however, two issues arise.  The complete transfer characteristics of the bistable circuit requires that the input voltage level be swept from the negative supply level to the positive supply level, then returned back to the negative supply. This, therefore, requires two Spice runs; one for each sweep direction. Secondly, Spice has problems with convergence at the point where the circuit changes state and usually fails to complete the solution.

 

A better technique for obtaining the transfer characteristics of a regenerative circuit with hysteresis is to apply a low frequency triangular waveform as input to the bistable circuit whose level varies between the two power supply levels. In this way, one mimics the same action one takes when measuring the transfer characteristics of a circuit in the laboratory.  The frequency of the input signal is kept low to minimize the effects of op-amp dynamics on the circuit transfer characteristics.

 

The Spice description of the bistable circuit shown in Fig. 12.11(a) is seen listed in Fig. 12.12. The input triangular waveform is described using a PWL transient source description beginning at -15 V and rising to +15 V in the first second and then decreasing back to -15 V in the next second. A transient analysis is requested to compute the output voltage over a two second interval. The results of this analysis are seen in Fig.12.13. The top graph displays the input and output transient waveforms. The information contained in this figure is then translated into the transfer characteristics shown in the bottom graph. From this plot, we see that the lower threshold limit (VTL ) equals -1.3266 V and the upper threshold limit (VTH) equals +1.3121 V. The width of the hysteresis is thus computed to be 2.639 V.

 

It is interesting to compare these threshold levels with those predicted by the theory presented by Sedra and Smith in Section 12.4.  For instance, we see from Fig. 12.13 that the saturation level of the 741 op-amp circuit is ±14.6 V. Since β=R1/(R1 + R2), we find with the appropriate values substituted that β=0.091.  Thus, we find: VTH = - VTL = 1.33 V, which are reasonably close to the threshold levels obtained through Spice simulation.

 

A close up of text on a white background

Description automatically generated

 

Fig. 12.11:  (b) An astable multi-vibrator circuit: Square Generator.

(duplicate)

An Astable Multivibrator: Square-Wave Generator

 

** Circuit Description **

 

* op-amp subcircuit

 

+++++ place uA741 op-amp subcircuit here (see Fig. 12.1) +++++

 

** Main Circuit **

* power supplies

Vcc 4 0 DC +15V

Vee 5 0 DC -15V

* multivibrator circuit

Xopamp1 2 1 4 5 3 uA741

R1 2 0 100k

R2 2 3 1Meg

R 1 3 1Meg

C 1 0 0.01uF IC=0V

** Analysis Requests **

.OPTIONS itl5=0

.TRAN 500us 50ms 0ms 500us

** Output Requests **

.PLOT TRAN V(3) V(1)

.probe

.end

 

 

Fig. 12.14: The Spice input deck for computing the transient behavior of the square-wave generator circuit.

 

 

 

A close up of text on a white surface

Description automatically generated

 

Fig. 12.15: Several waveforms associated with the square-wave generator shown in Fig. 12.11(b) -- top curve: output voltage waveform; bottom curve: voltage at input negative terminal of op-amp.

 

 

Generation of a Square-Wave Using an Astable Multivibrator:

 

A square-wave generator can be realized using a bistable multivibrator with an RC circuit in its feedback loop, as illustrated in Fig. 12.11(b). The components of the bistable circuit are the same as those used in the previous section, so its expected behavior is known.  Since the upper and lower saturation limits of the bistable portion of this circuit are equal (ie., L+ = - L-= 14.6 V), as well, β=0.091 and τ=RC=10 ms, the expected period of oscillation is then computed according to

(12.4)

 

to give 3.65 ms.

 

To confirm that this circuit indeed oscillates with a period of 3.65 ms, we have created the Spice input file description of this circuit shown in Fig. 12.14 and submitted it to Spice. On completion of Spice, the output waveform is shown plotted in the top graph of Fig.  12.15. The bottom graph displays the almost-triangular voltage waveform appearing at the positive input terminal to the op-amp. The period of oscillation for each of these waveforms is found to be 3.74 ms, which agrees fairly well with that predicted by theory.

 

 

 

A close up of text on a white background

Description automatically generated

 

Fig. 12.11:  (c) A monostable multivibrator circuit.

(duplicate)

The Monostable Multivibrator

 

** Circuit Description **

 

* op-amp subcircuit

 

+++++ place uA741 op-amp subcircuit here (see Fig. 12.1) +++++

 

** Main Circuit **

* power supplies

Vcc 5 0 DC +15V

Vee 6 0 DC -15V

* input trigger signal + circuit

Vtrig 7 0 PWL ( 0,+15V 10us,+15V 10.01us,0V 60us,0V 60.01us,+15V

+ 10ms, +15V 10.00001ms,0V 10.090ms,0V 10.09001ms,+15V 1s,+15V )

C2 7 4 0.1uF

R4 4 0 100k

D2 2 4 D1N4148

* monostable multivibrator circuit

Xopamp1 2 1 5 6 3 uA741

R1 2 0 1k

R2 2 3 9k

R3 1 3 50k

C1 1 0 0.1uF

D1 1 0 D1N4148

* model statements

.model D1N4148 D (Is=0.1p Rs=16 CJO=2p Tt=12n Bv=100 Ibv=0.1p)

** Analysis Requests **

.IC V(3)=+15V

.TRAN 1ms 2ms 0ms

** Output Requests **

.PLOT TRAN V(7) V(3) V(1)

.probe

.end

 

 

Fig. 12.16: The Spice input deck for computing several time waveforms of the monostable op-amp circuit shown in Fig. 12.11(c).

 

 

A screenshot of text

Description automatically generated

 

Fig. 12.17: Several waveforms associated with the monostable op-amp circuit shown in Fig. 12.11(c) -- top curve: input trigger waveform; middle curve: output voltage waveform; bottom curve: voltage at input negative terminal of op-amp.

 

 

 

 

The Monostable Multivibrator:

 

A monostable is often used to create a pulse of a fixed duration that is triggered by another pulse of arbitrary duration.  In Fig. 12.11(c) we present one such monostable that has been designed to generate a pulse of 755 μs duration when it receives a negative-going trigger pulse whose level varies between VCC and ground, according to the formula:

(12.5)

           

 

 

Using the Spice deck listed in Fig. 12.16 we have computed the response of the monostable when triggered with a negative-going pulse of a 50 μs duration. The width of this pulse was chosen to ensure that the op-amp has sufficient time to change state. Recall that the slew-rate of a 741 op-amp is nominally 0.63 V/μs. For a complete change of state, the op-amp output voltage undergoes a change of about 30 V. Thus, the time that it takes to change state is approximately 50 μs.  The results of the simulation are shown in Fig. 12.17. In this diagram, the top graph displays the trigger pulse and the curve below it illustrates the output generated pulse. Here we see that the duration of this pulse is approximately 750 μs, as measured from the points where the output signal crosses the 0 V axis. This result seems to agree reasonably well with the value estimated using the above equation. Also evident, is the time that it takes the op-amp output to change state which is found to be 67 μs. Finally, the bottom-most graph displays the voltage appearing at the negative input terminal of the op-amp.  Clearly, it takes this waveform 1441.1 μs to recover from the trigger pulse. Therefore, the maximum frequency of operation for this circuit is limited to 693 Hz.

 

A close up of text on a black background

Description automatically generated

 

Fig. 12.18:  A three-segment sine-wave shaper.

 

A 3-Segment Sine-Wave Shaper

 

** Circuit Description **

* power supplies

Vcc 1 0 DC +15V

Vee 6 0 DC -15V

* input triangular source

Vi 8 0 DC 0V PULSE (-10V 10V 0 0.5ms 0.5ms 1us 1ms)

* diode shaper circuit

R1a 1 2 5k

R1b 5 6 5k

R2a 2 3 1.25k

R2b 4 5 1.25k

R3a 3 0 1.25k

R3b 4 0 1.25k

R4 8 7 10k

R5a 3 9 10k

R5b 4 10 10k

D1 7 2 D1N4148

D2 7 9 D1N4148

D3 10 7 D1N4148

D4 5 7 D1N4148

* model statements

.model D1N4148 D (Is=0.1p Rs=16 CJO=2p Tt=12n Bv=100 Ibv=0.1p)

** Analysis Requests **

.FOUR 1kHz V(7)

.TRAN 50us 4ms 0ms 50us

** Output Requests **

.PLOT TRAN V(7) V(8)

.probe

.end

 

 

Fig. 12.19: The Spice input deck for computing the total harmonic distortion of the three-segment sine-wave shaper shown in Fig. 12.18. A 10 V peak triangular waveform is applied to the input of this circuit.

 

 

A picture containing boat, water, outdoor, large

Description automatically generated

 

Fig. 12.20: The input and output waveforms associated with the three-segment sine-wave shaper shown in Fig12.18. The output signal is very nearly sinusoidal with a total harmonic content of approximately 3.2%.

 

 

 

12.4 A Nonlinear Waveform-Shaping Circuit

A three-segment sine-wave shaper with a triangular input signal is shown on display in Fig. 12.18. This type of circuit is used to shape the input triangular signal into a sinusoidal signal of the same frequency. Although this circuit has a very simple structure, it produces an output sinusoidal signal of relatively high spectral purity.  In the following we shall use Spice to investigate the distortion content contained in the output signal created by the shaper circuit when a 10 V peak triangular signal of 1 kHz frequency is applied to its input.

 

Consider the Spice input description of the 3-segment shaper Fig. 12. 19. Here we have created the 10 V peak input triangular waveform of frequency 1 kHz using the pulse transient command of Spice. A transient analysis is requested using a sampling interval of 50 μs over a 4 ms time interval. Because the frequency of the output signal is known by virtue of the known input signal frequency, we can also include a Fourier series command at this time in the Spice input file.

 

The input and output signals as computed by Spice are shown in Fig. 12.20. As is evident, the output signal (V(7)) appears sinusoidal in shape with some distortion clearly present.  The distortion components present in the output signal are shown below as computed by Spice:

 

FOURIER COMPONENTS OF TRANSIENT RESPONSE V(7)

 

 DC COMPONENT =   1.217944E-02

 

 HARMONIC   FREQUENCY    FOURIER    NORMALIZED    PHASE        NORMALIZED

    NO         (HZ)     COMPONENT    COMPONENT    (DEG)       PHASE (DEG)

 

     1     1.000E+03    5.892E+00    1.000E+00   -9.018E+01    0.000E+00

     2     2.000E+03    7.432E-03    1.261E-03   -8.895E+01    1.237E+00

     3     3.000E+03    6.693E-02    1.136E-02    8.939E+01    1.796E+02

     4     4.000E+03    5.825E-04    9.886E-05    8.222E+01    1.724E+02

     5     5.000E+03    1.643E-01    2.788E-02   -9.107E+01   -8.871E-01

     6     6.000E+03    2.138E-03    3.628E-04   -8.672E+01    3.466E+00

     7     7.000E+03    8.717E-03    1.480E-03   -8.918E+01    1.006E+00

     8     8.000E+03    2.038E-03    3.459E-04   -8.494E+01    5.247E+00

     9     9.000E+03    5.376E-02    9.125E-03    8.854E+01    1.787E+02

 

     TOTAL HARMONIC DISTORTION =   3.152547E+00 PERCENT

 

 

Surprisingly, the total harmonic distortion is only 3.2%. When compared to the Wien-bridge sinusoidal oscillator of section 12.1.1, we see that the shaper circuit shown in Fig. 12.18 created an output signal with 2% less harmonic distortion.

 

 

A close up of a map

Description automatically generated

 

Fig. 12.21:  Precision rectifier circuits: (a) half-wave rectifier circuit. (b) peak detector circuit. (c) clamping circuit.

 

12.5 Precision Rectifier Circuits

In this section we shall investigate the characteristics of several precision rectifier circuits used in different instrumentation applications. This will include Spice analysis of a precision half-wave rectifier, a peak detector and a clamping circuit, as shown in Fig. 12.21. We have purposely kept the input signal frequency low in order to minimize the dynamic effects (ie., slew rate) of the op-amp on circuit operation. With higher input signal frequencies, these effects will begin to play a significant role in circuit operation. We encourage our readers to investigate this on their own.

 

A close up of a map

Description automatically generated

 

Fig. 12.21:  Precision rectifier circuits: (a) half-wave rectifier circuit.

(duplicate)

Precision Rectifier Circuit

 

** Circuit Description **

 

* op-amp subcircuit

 

+++++ place uA741 op-amp subcircuit here (see Fig. 12.1) +++++

 

** Main Circuit **

* power supplies

Vcc 5 0 DC +15V

Vee 6 0 DC -15V

* input signal source

Vi 1 0 DC 0V SIN( 0V 1V 1kHz )

* limiter circuit

Xopamp 0 2 5 6 3 uA741

R1 1 2 1k

R2 2 4 2k

D1 2 3 D1N4148

D2 3 4 D1N4148

* model statements

.model D1N4148  D (Is=0.1p Rs=6 CJO=1p Tt=3n Bv=100 Ibv=0.1p)

** Analysis Requests **

.DC Vi -15V +15V 0.5V

** Output Requests **

.PLOT DC V(4)

.probe

.end

 

 

Fig. 12.22: The Spice input deck for computing the input-output transfer characteristics of the peak detector shown in in Fig. 12.21(a).

 

A close up of a map

Description automatically generated

 

(a)

 

A screenshot of a cell phone

Description automatically generated

 

(b)

Fig. 12.23: The input-output transfer characteristics of the precision half-wave rectifier circuit shown in Fig. 12.21(a): (a) Input voltage varied between the positive and negative supply rails. (b) Input voltage varied between -50 μV and 200 μV.

 

 

 

A Half-Wave Rectifier Circuit:

 

In Fig. 12.21(a) we present a precision half-wave rectifier circuit. The active components are made up of a single 741 op-amp and two 1N4148-type diodes. Using a DC sweep of the input voltage level ranging between the two power supply levels we shall compute the input-output transfer characteristics of this circuit.

 

The Spice input file describing the circuit including the appropriate analysis requests is shown listed in Fig. 12.22. The resulting transfer characteristics are shown plotted in Fig. 12.23.  The curve in part (a) of this figure illustrates the output voltage as a function of the input voltage when the latter is varied between the positive and negative supplies.  For negative input signals, the output signal will be seen to be twice the size of the input signal with an 180o phase shift.  For positive input signals, no signal appears at the output. Thus, half-wave rectification is performed.  Figure 12.23(b) provides an expanded view of the transfer characteristic for signals in the range -50 μV to 200 μV. Here we see that the transfer characteristic does not go through the origin but instead has an output offset voltage of 211.9 μV. As well, we see from this curve that for positive input voltages larger than 100 μV, the output voltage does not go to zero but levels off at 20.9 μV.

 

A close up of a map

Description automatically generated

 

Fig. 12.21:  Precision rectifier circuits: (b) peak detector circuit.

(duplicate)

A Buffered Precision Peak Detector

 

** Circuit Description **

 

* op-amp subcircuit

 

+++++ place uA741 op-amp subcircuit here (see Fig. 12.1) +++++

 

** Main Circuit **

* power supplies

Vcc 6 0 DC +15V

Vee 7 0 DC -15V

* input signal source

Vi 1 0 DC 0V PWL ( 0s,-15V 1ms,-7.5V 2ms,-15V 3ms,-15V 4ms,0V 5ms,-15V

+             6ms,-15V 7ms,+7.5V 8ms,-15V 9ms,-15V 10ms,+10V 11ms,-15V )

* limiter circuit

Xopamp1 1 2 6 7 3 uA741

Xopamp2 4 5 6 7 5 uA741

D1 3 4 D1N4148

D2 2 3 D1N4148

R 2 5 1k

C 4 0 1uF

* model statements

.model D1N4148 D (Is=0.1p Rs=16 CJO=2p Tt=12n Bv=100 Ibv=0.1p)

** Analysis Requests **

.OPTIONS itl5=0

.TRAN 0.5ms 11ms 0s 0.5ms

** Output Requests **

.PLOT TRAN V(1) V(3)

.probe

.end

 

 

Fig. 12.24: The Spice input deck for computing the transient behavior of the peak detector shown in Fig. 12.21(b).

 

 

A picture containing photo, dog, boat, large

Description automatically generated

 

Fig. 12.25: The input and output transient waveforms of the peak detector shown in Fig. 12.21(b).

 

 

 

A Buffered Peak Detector:

 

In Fig. 12.21(b) we present a buffered precision peak detector. The purpose of this circuit is to hold the peak value of some input signal over long periods of time. To demonstrate the behavior of this circuit, we shall apply an input triangular signal with increasing peak values and observe the output signal from this detector. The Spice circuit description of this circuit is shown listed in Fig. 12.25, together with the piece-wise linear description of the input signal. A transient analysis is requested to compute the output signal over an 11 ms interval of the input signal.

 

The input and output signals for this experiment, as calculated by Spice, are shown in Fig. 12.25. We see here that this circuit does indeed hold the output level constant at the most recent peak level of the input signal.

 

 

A close up of a map

Description automatically generated

 

Fig. 12.21:  Precision rectifier circuits: (c) clamping circuit.

(duplicate)

A Precision Clamping Circuit

 

** Circuit Description **

 

* op-amp subcircuit

 

+++++ place uA741 op-amp subcircuit here (see Fig. 12.1) +++++

 

** Main Circuit **

* power supplies

Vcc 4 0 DC +15V

Vee 5 0 DC -15V

* input signal source

Vi 1 0 SIN ( 0 5V 1kHz )

* limiter circuit

Xopamp1 0 2 4 5 3 uA741

D1 3 2 D1N4148

C 1 2 1uF IC=0V

* model statements

.model D1N4148 D (Is=0.1p Rs=16 CJO=2p Tt=12n Bv=100 Ibv=0.1p)

** Analysis Requests **

.OPTIONS itl5=0

.TRAN 50us 4ms 0s 50us UIC

** Output Requests **

.PLOT TRAN V(3) V(1)

.probe

.end

 

 

Fig. 12.26: The Spice input deck for computing the transient behavior of the clamping circuit shown in Fig. 12.21(c).

 

 

       

 

A close up of a map

Description automatically generated

 

Fig. 12.27: The input and output transient waveforms of the clamping circuit shown in Fig. 12.21(c).

 

 

A Clamping Circuit:

 

As the final example of this section, we present in Fig. 12.21(c) a precision op-amp clamping circuit whose function is to restore a DC level to some AC coupled input signal. Consider applying a 5 V peak input sinusoidal signal of 1 kHz frequency to the input of this clamping circuit with no DC offset.  The Spice input file describing this setup is shown listed in Fig. 12.26. A transient analysis is requested, and the input and output signals are to be observed.  The results of this analysis are shown in Fig. 12.27. Clearly, the output signal has been offset by the peak of the input signal and now varies between 0 V and +10 V.  Also seen is that it takes less than one cycle of the input waveform to reach steady state.

 

12.6 Spice Tips

 

·      Various electronic manufacturers are making available Spice models of their components in the form of subcircuits that can be included directly into a Spice deck.

 

·      The Fourier analysis command (.FOUR) of Spice requires a very good estimate of the frequency of the signal that is to be analyzed. A fractional error in this frequency estimate can produce noticeable change in the harmonic content of the output waveform.

 

·      A Fourier analysis should only be performed on a periodic waveform that has reached steady state. One must allow the transient in the output waveform to decrease to un-appreciable level.  As a rule-of-thumb, for a circuit dominated by a pair of complex conjugate poles described by ωo and Q, the transient portion of the waveform will require 2Q/ωo x ln(0.001) seconds for it to decrease to less than 0.1 per-cent of its initial value.

 

·      The Q-factor associated with crystal oscillators are on the order of tens-of-thousands, and therefore these circuits require incredibly long simulation times before the steady-state is reached.

 

·      Initializing the reactive elements of a circuit with values that are close to their steady-state current or voltage values can reduce the time required for a circuit to reach its steady-state.

 

·      The transfer characteristics of regenerative circuits with hysteresis are best computed with Spice by applying a triangular waveform input whose level varies between the two power supply levels.

 

 

 

12.7 Bibliography

 

Staff, Linear Circuits: Operational Amplifier Macromodels, Data Manual, Texas Instruments, Dallas, Texas, 1990.

 

12.8 Problems

 

12.1           Compare the amplitude of oscillation of the output voltage generated by the Wien-Bridge oscillator shown in Fig. 12.2 with and without the diode limiter in the op-amp feedback path.

 

12.2           An oscillator is formed by loading a transconductance amplifier having a positive gain with a parallel RLC circuit and connecting the output to the input directly. Let the transconductance amplifier have an input resistance of 10 kΩ and output resistance of 10 kΩ. The LC resonator has L=10 μH, C=1000 pF, and Q=100. For what value of transconductance Gm will the circuit oscillate? Confirm that this value of transconductance does indeed cause the circuit to oscillate. What is the resulting frequency of oscillation?

 

12.3           Using Spice, determine the transfer characteristics of the comparator circuit shown in Fig. P12.3. Subsequently, connect a dc source VB=+1 V to the virtual ground of the op-amp through a resistor of RB=10 kΩ and observe that the transfer characteristics are shifted along the vi-axis to the point vi=-(R1/RB)VB. Use the subcircuit description for the 741 op-amp provided in Fig. 12.1 as the macromodel for the op-amp in the comparator circuit.  Assume that the two diodes have parameters IS=10-14 A and n=1.

 

12.4           For the circuit in Fig. P12.4, determine the loop transmission L(jω) and the frequency for zero loop-phase. Verify that the circuit indeed oscillates at this frequency. Assume that the op-amp is of the 741 type.

 

A close up of a logo

Description automatically generated    

 

Fig. P12.3       

 

                        A close up of a logo

Description automatically generated 

Fig. P12.4

 

                        A close up of a logo

Description automatically generated

 

Fig. P12.5

12.5           For the circuit in Fig. P12.5, plot its input-output transfer characteristics vo-vi using Spice. Assume that the op-amp is modeled after the 741 op-amp and the two diodes after the commercial diode 1N4148. What is the maximum diode current?

 

12.6           Consider the circuit of Fig. P12.5 with R1 eliminated and R2 short-circuited. Plot the input--output transfer characteristics. Model the op-amp after the 741 op-amp and the two diodes after the commercial diode 1N4148.

 

12.7           Find the frequency of oscillation of the circuit in Fig. 12.11(b) for the case R1=10 kΩ, R2=16 kΩ, C=10 nF, and R=62 kΩ. Assume that the op-amp is of the 741 type.

 

A close up of a logo

Description automatically generated

 

Fig. P12.8

 

12.8           The circuit of Fig. P12.8 consists of an inverting bistable multivibrator with an output limiter and a noninverting integrator. Using equal values for all resistors except R7 and a 0.5 nF capacitor, design the circuit to obtain a square wave at the output of the bistable multivibrator of 15 V peak-to-peak amplitude and a 10 kHz frequency. Plot the transient voltage waveform appearing at the integrator output. Model the op-amp as a high-gain VCVS with a diode clamping circuit to limit the range of output voltage to ±13 V and model the zener diodes with the equivalent circuit shown in Fig. 3.13.

A close up of a piece of paper

Description automatically generated

                                                                                                                                               

Fig. P12.9

 

12.9           An oscillator circuit that generates two sinewave signals that are in quadrature is shown in Fig. P12.9. It oscillates at a frequency of 5 kHz. Using Spice, confirm that the two output signals are indeed in quadrature (i.e., 90o apart) and that the frequency of oscillation is 5 kHz. Also, using the Fourier analysis capability of Spice, determine the total harmonic distortion present in the two output waveforms.

 

A close up of a logo

Description automatically generated                    

Fig. P12.10

                       

12.10        Using Spice determine the transfer characteristics of the logarithmic amplifier circuit shown in Fig. P12.10. Assume that the op-amp is of the 741 type and the diode has model parameters IS=10-14 A and n=1.2.  Next, apply a 1 V, 1 kHz sine-wave to the circuits input and compute the output voltage waveform. Verify that the output voltage is related to the input voltage signal according to the expression:

 

 

where VT is the thermal voltage.

 

 

A picture containing object

Description automatically generated

                                                                                                                       

Fig. P12.11

 

 

12.11        The circuit of Fig. P12.11 implements the transfer characteristic vo=v1 x v2 for v1 and v2 < 0. Such a circuit is known as an analog multiplier. Using Spice, determine the transfer characteristics vo - v1 for the following values of v2: 0.1, 0.5, 1.0, 2, 3, 5, 10 V. Assume all diodes to be identical, with 700 mV drop at 1 mA current and n=2. Model the op-amp as a high-gain VCVS with a diode clamping circuit to limit the range of output voltage to ±12 V.}

 

12.12        For the multiplier circuit shown in Fig. P12.11, use Spice to compute its output voltage waveform vo assuming that the voltage waveform applied to input v1 is described by 1 + 0.001sin ( 2 π 104 ) V and the voltage signal applied to input v2 is described by 1 + 0.001sin ( 2 π 103 ) V.

 

12.13        Consider that a squarer circuit can be realized using the multiplier circuit shown in Fig. P12.11 by connecting the two inputs (v1 and v2) together, forming a single input. Apply a 1-volt-peak sinewave of 1 kHz, offset by +5 V, to the input and compute the output voltage waveform for at least one complete period of the output signal. What happens to the output signal if the dc offset voltage is reduced to 0 V?

A close up of a logo

Description automatically generated

 

Fig. P12.14     

 

12.14        A circuit that divides one signal by another can be realized using a multiplier circuit such as the one shown in Fig.  P12.11 arranged in the feedback loop of an op-amp as demonstrated in Fig. P12.14. The polygon with a cross in the center is meant to symbolize the multiplier circuit shown in Fig. P12.11. Verify the operation of this divider circuit by computing the transfer characteristics vo - vx for the following values of vy: -1, 0.1, 0.5, 1.0, 2, 3, 5 and 10 V.

 

A close up of a device

Description automatically generated

 

Fig. P12.15

12.15        Two super-diode circuits, such as the one shown in Fig. P12.15, are connected to a common load resistor of 20 kΩ and having the same input signal have their diodes reversed, one with cathode to the load, the other with anode to load. For a sinewave input of 10 V peak to peak and 1 kHz frequency, using Spice, plot the output voltage waveform and the current supplied by each super-diode circuit. Assume that the op-amp and diode is modeled after the 741 and 1N4148, respectively.

 

12.16        The super-diode circuit of Fig. P12.15 can be made to have gain by connecting a resistor R2 in place of the short circuit between the cathode of the diode and the negative input terminal of the op-amp, and a resistor R1 between the negative input terminal and ground. Design the circuit for a gain of 2. For a 10 V peak-to-peak input sinewave of 1 kHz frequency, determine, with the aid of Spice, the average voltage waveform appearing at the output. Assume that the op-amp is modeled after the 741 op-amp and the diode after the 1N4148.

A picture containing object, antenna

Description automatically generated     

 

Fig. P12.17

 

12.17        The circuit shown in Fig. P12.17 is used as a voltmeter which is intended to function at frequencies of 10 Hz and above. It consists of precision half-wave rectifier followed by a first-order lowpass filter. Apply a 100 mV rms sinewave input signal of 10 kHz and observe the voltage signal appearing at the output. Does the output signal correspond to the average value of the input signal? Repeat with a triangular waveform and a square-wave as input.  Model the op-amp as a high-gain VCVS with a diode clamping circuit to limit the range of output voltage to ±12 V.  Assume that the diode has parameters IS=10-14 A and n=1.6.

 

A close up of a logo

Description automatically generated

Fig. P12.18

 

12.18        Using Spice, plot the transfer characteristics of the circuit in Fig. P12.18. Assume that the op-amp is modeled after the 741 op-amp and the diode after the 1N4148.

 

A close up of a logo

Description automatically generated    

Fig. P12.19

 

 

12.19        With the aid of Spice, determine the transfer characteristics vo1 - vi and vo - vi of the circuit shown in Fig. P12.19. Assume that the op-amp is modeled after the 741 op-amp and the diode after the 1N4148.

 

A close up of a logo

Description automatically generated

Fig. P12.20

 

12.20        Using Spice, plot the transfer characteristics of the circuit in Fig. P12.20. Assume that the op-amp is modeled after the 741 op-amp and the diode after the 1N4148.

 

 



[1] Those readers who have the PSpice student version will find that this op-amp macromodel is contained in a file called NOM.LIB, along with other models of different electronic devices.